<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Desktop file based GAppInfo</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="GIO Reference Manual">
<link rel="up" href="types.html" title="File types and applications">
<link rel="prev" href="GAppInfo.html" title="GAppInfo">
<link rel="next" href="volume_mon.html" title="Volumes and Drives">
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="pt01.html" title="Part&#160;I.&#160;GIO Overview">
<link rel="chapter" href="ch01.html" title="Introduction">
<link rel="chapter" href="ch02.html" title="Compiling GIO applications">
<link rel="chapter" href="ch03.html" title="Running GIO applications">
<link rel="chapter" href="gio-extension-points.html" title="Extending GIO">
<link rel="part" href="pt02.html" title="Part&#160;II.&#160;API Reference">
<link rel="chapter" href="file_ops.html" title="File Operations">
<link rel="chapter" href="file_mon.html" title="File System Monitoring">
<link rel="chapter" href="async.html" title="Asynchronous I/O">
<link rel="chapter" href="streaming.html" title="Streaming I/O">
<link rel="chapter" href="types.html" title="File types and applications">
<link rel="chapter" href="volume_mon.html" title="Volumes and Drives">
<link rel="chapter" href="icons.html" title="Icons">
<link rel="chapter" href="utils.html" title="Utilities">
<link rel="chapter" href="extending.html" title="Extending GIO">
<link rel="part" href="migrating.html" title="Part&#160;III.&#160;Migrating to GIO">
<link rel="chapter" href="ch14.html" title="Migrating from POSIX to GIO">
<link rel="chapter" href="ch15.html" title="Migrating from GnomeVFS to GIO">
<link rel="chapter" href="gio-hierarchy.html" title="Object Hierarchy">
<link rel="index" href="ix01.html" title="Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GAppInfo.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="types.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GIO Reference Manual</th>
<td><a accesskey="n" href="volume_mon.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2769372" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2878828" class="shortcut">Description</a>
                  &#160;|&#160;
                  <a href="#id2878783" class="shortcut">Object Hierarchy</a>
                  &#160;|&#160;
                  <a href="#id2878807" class="shortcut">Implemented Interfaces</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gio-Desktop-file-based-GAppInfo"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2769372"></a><span class="refentrytitle">Desktop file based GAppInfo</span>
</h2>
<p>Desktop file based GAppInfo &#8212; Application information from desktop files</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<a name="GDesktopAppInfo"></a><pre class="synopsis">

#include &lt;gio/gdesktopappinfo.h&gt;


                    <a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfo-struct">GDesktopAppInfo</a>;
<a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfo">GDesktopAppInfo</a>*    <a class="link" href="gio-Desktop-file-based-GAppInfo.html#g-desktop-app-info-new-from-filename">g_desktop_app_info_new_from_filename</a>
                                                        (const char *filename);
<a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfo">GDesktopAppInfo</a>*    <a class="link" href="gio-Desktop-file-based-GAppInfo.html#g-desktop-app-info-new">g_desktop_app_info_new</a>              (const char *desktop_id);
<a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            <a class="link" href="gio-Desktop-file-based-GAppInfo.html#g-desktop-app-info-get-is-hidden">g_desktop_app_info_get_is_hidden</a>    (<a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfo">GDesktopAppInfo</a> *info);
void                <a class="link" href="gio-Desktop-file-based-GAppInfo.html#g-desktop-app-info-set-desktop-env">g_desktop_app_info_set_desktop_env</a>  (const char *desktop_env);
                    <a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfoLookup">GDesktopAppInfoLookup</a>;
#define             <a class="link" href="gio-Desktop-file-based-GAppInfo.html#G-DESKTOP-APP-INFO-LOOKUP-EXTENSION-POINT-NAME:CAPS">G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME</a>
<a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a>*           <a class="link" href="gio-Desktop-file-based-GAppInfo.html#g-desktop-app-info-lookup-get-default-for-uri-scheme">g_desktop_app_info_lookup_get_default_for_uri_scheme</a>
                                                        (<a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfoLookup">GDesktopAppInfoLookup</a> *lookup,
                                                         const char *uri_scheme);


</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2878783"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">

  <a
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----GDesktopAppInfo
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2878807"></a><h2>Implemented Interfaces</h2>
<p>
GDesktopAppInfo implements
 <a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a>.</p>
</div>
<div class="refsect1" lang="en">
<a name="id2878828"></a><h2>Description</h2>
<p>
<a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfo"><span class="type">GDesktopAppInfo</span></a> is an implementation of <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> based on
desktop files.</p>
<p>

</p>
</div>
<div class="refsect1" lang="en">
<a name="id2878862"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2878872"></a><h3>
<a name="GDesktopAppInfo-struct"></a>GDesktopAppInfo</h3>
<a class="indexterm" name="id2878884"></a><pre class="programlisting">typedef struct _GDesktopAppInfo GDesktopAppInfo;</pre>
<p>
Information about an installed application from a desktop file.</p>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2878905"></a><h3>
<a name="g-desktop-app-info-new-from-filename"></a>g_desktop_app_info_new_from_filename ()</h3>
<a class="indexterm" name="id2878916"></a><pre class="programlisting"><a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfo">GDesktopAppInfo</a>*    g_desktop_app_info_new_from_filename
                                                        (const char *filename);</pre>
<p>
Creates a new <a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfo"><span class="type">GDesktopAppInfo</span></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em>&#160;:</span></p></td>
<td> a string containing a file name.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a new <a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfo"><span class="type">GDesktopAppInfo</span></a> or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> on error.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2875353"></a><h3>
<a name="g-desktop-app-info-new"></a>g_desktop_app_info_new ()</h3>
<a class="indexterm" name="id2875363"></a><pre class="programlisting"><a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfo">GDesktopAppInfo</a>*    g_desktop_app_info_new              (const char *desktop_id);</pre>
<p>
Creates a new <a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfo"><span class="type">GDesktopAppInfo</span></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>desktop_id</code></em>&#160;:</span></p></td>
<td> the desktop file id
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> a new <a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfo"><span class="type">GDesktopAppInfo</span></a>, or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if no desktop file with that id
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2875447"></a><h3>
<a name="g-desktop-app-info-get-is-hidden"></a>g_desktop_app_info_get_is_hidden ()</h3>
<a class="indexterm" name="id2875458"></a><pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
>gboolean</a>            g_desktop_app_info_get_is_hidden    (<a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfo">GDesktopAppInfo</a> *info);</pre>
<p>
A desktop file is hidden if the Hidden key in it is
set to True.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfo"><span class="type">GDesktopAppInfo</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if hidden, <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> otherwise. 
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2875546"></a><h3>
<a name="g-desktop-app-info-set-desktop-env"></a>g_desktop_app_info_set_desktop_env ()</h3>
<a class="indexterm" name="id2875557"></a><pre class="programlisting">void                g_desktop_app_info_set_desktop_env  (const char *desktop_env);</pre>
<p>
Sets the name of the desktop that the application is running in.
This is used by <a class="link" href="GAppInfo.html#g-app-info-should-show"><code class="function">g_app_info_should_show()</code></a> to evaluate the
<code class="literal">OnlyShowIn</code> and <code class="literal">NotShowIn</code>
desktop entry fields.
</p>
<p>
The <a class="ulink" href="http://standards.freedesktop.org/menu-spec/latest/" target="_top">Desktop 
Menu specification</a> recognizes the following:
</p>
<table class="simplelist" border="0" summary="Simple list">
<tr><td>GNOME</td></tr>
<tr><td>KDE</td></tr>
<tr><td>ROX</td></tr>
<tr><td>XFCE</td></tr>
<tr><td>Old</td></tr>
</table>
<p>
</p>
<p>
Should be called only once; subsequent calls are ignored.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>desktop_env</code></em>&#160;:</span></p></td>
<td> a string specifying what desktop this is
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2875667"></a><h3>
<a name="GDesktopAppInfoLookup"></a>GDesktopAppInfoLookup</h3>
<a class="indexterm" name="id2875678"></a><pre class="programlisting">typedef struct _GDesktopAppInfoLookup GDesktopAppInfoLookup;</pre>
<p>
Interface that is used by backends to associate default 
handlers with URI schemes.</p>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2875700"></a><h3>
<a name="G-DESKTOP-APP-INFO-LOOKUP-EXTENSION-POINT-NAME:CAPS"></a>G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME</h3>
<a class="indexterm" name="id2875714"></a><pre class="programlisting">#define G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME "gio-desktop-app-info-lookup"
</pre>
<p>
Extension point for default handler to URI association. See
Extending GIO.</p>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2875742"></a><h3>
<a name="g-desktop-app-info-lookup-get-default-for-uri-scheme"></a>g_desktop_app_info_lookup_get_default_for_uri_scheme ()</h3>
<a class="indexterm" name="id2875756"></a><pre class="programlisting"><a class="link" href="GAppInfo.html" title="GAppInfo">GAppInfo</a>*           g_desktop_app_info_lookup_get_default_for_uri_scheme
                                                        (<a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfoLookup">GDesktopAppInfoLookup</a> *lookup,
                                                         const char *uri_scheme);</pre>
<p>
Gets the default application for launching applications 
using this URI scheme for a particular GDesktopAppInfoLookup
implementation.
</p>
<p>
The GDesktopAppInfoLookup interface and this function is used
to implement <a class="link" href="GAppInfo.html#g-app-info-get-default-for-uri-scheme"><code class="function">g_app_info_get_default_for_uri_scheme()</code></a> backends
in a GIO module. There is no reason for applications to use it
directly. Applications should use <a class="link" href="GAppInfo.html#g-app-info-get-default-for-uri-scheme"><code class="function">g_app_info_get_default_for_uri_scheme()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>lookup</code></em>&#160;:</span></p></td>
<td> a <a class="link" href="gio-Desktop-file-based-GAppInfo.html#GDesktopAppInfoLookup"><span class="type">GDesktopAppInfoLookup</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uri_scheme</code></em>&#160;:</span></p></td>
<td> a string containing a URI scheme.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td> <a class="link" href="GAppInfo.html" title="GAppInfo"><span class="type">GAppInfo</span></a> for given <em class="parameter"><code>uri_scheme</code></em> or <a
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> on error.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2867997"></a><div class="refsect2" lang="en"><a name="id2867998"></a></div>
<hr>
<div class="refsect2" lang="en"><a name="id2867999"></a></div>
</div>
</div>
</body>
</html>
